package com.rc.saas.tenant.mapper.market;


import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.common.base.BaseMapper;
import com.rc.saas.tenant.model.market.MarketActivity;
import com.rc.saas.tenant.model.market.MarketActivityExample;
import com.rc.saas.tenant.model.market.MarketActivityMemberInfo;
import com.rc.saas.tenant.search.activity.ActivityMemberSearch;
import com.rc.saas.tenant.search.market.MarketSearch;
import com.rc.saas.tenant.vo.market.ActivityEchartsResult;
import com.rc.saas.tenant.vo.market.MarketActivityDiscountVo;
import com.rc.saas.tenant.vo.market.MarketActivityVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketActivityMapper extends BaseMapper<Long, MarketActivity, MarketActivityExample> {

    MarketActivityVo selectMarketActivityByTenantCode(String tenantCode);

    MarketActivityDiscountVo selectDiscountAndTicket(Long marketActivityId);

    void insertSelectiveReturnId(MarketActivity marketActivity);

    List<MarketActivity> listExecuteDiscount(@Param("tenantCode") String tenantCode, @Param("aliPay") Integer aliPay,
                                             @Param("wxPay") Integer wxPay, @Param("unPay") Integer unPay,
                                             @Param("abcPay") Integer abcPay, @Param("isApp") Integer isApp, @Param("isWx") Integer isWx);

    List<MarketActivity> listPageMarketActivity(MarketSearch marketSearch);

    List<MarketActivityMemberInfo> listPageActivityMemberInfo(ActivityMemberSearch activityMemberSearch);

    List<ActivityEchartsResult> getActivityEchartsData(String startTime, String endTime);

    List<ActivityEchartsResult> getActivityEchartsDataDay(String startTime, String endTime);

    MarketActivity findById(Long id);
}
